package cn.itsource.controller;

import cn.itsource.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    //加载端口
    @Value("${server.port}")
    private int port;

    @GetMapping("/get")
    public User get11() {
        User user = new User();
        user.setDesc("这是寻找到的端口"+port);
        user.setUsername("asdhjiop'awdhioqwe");
        return user;
    }
}
